home *** CD-ROM | disk | FTP | other *** search
/ Champak 119 / (Vol 119) Nov 09 2010.iso / Games / crusade_of_cuisine.swf / scripts / frame_13 / DoAction.as < prev   
Text File  |  2010-11-09  |  34KB  |  1,256 lines

  1. _root.createEmptyMovieClip("burgerLayer",98);
  2. _root.createEmptyMovieClip("MMLayer",91);
  3. _root.createEmptyMovieClip("kfcLayer",89);
  4. _root.createEmptyMovieClip("bossLayer",88);
  5. _root.createEmptyMovieClip("bulletLayer",99);
  6. _root.createEmptyMovieClip("fireLayer",96);
  7. _root.createEmptyMovieClip("pigLayer",97);
  8. _root.createEmptyMovieClip("bulletLayer",95);
  9. _root.createEmptyMovieClip("swordfishLayer",94);
  10. _root.createEmptyMovieClip("dolphinLayer",103);
  11. _root.createEmptyMovieClip("gatorLayer",105);
  12. if(nellySelected == true)
  13. {
  14.    _root.createEmptyMovieClip("player",100);
  15.    player.attachMovie("fridge_mov",fridge,90);
  16.    player._x = 600;
  17.    player._y = 300;
  18.    player._xscale = 100;
  19.    player._yscale = 100;
  20. }
  21. if(nellySelected == false)
  22. {
  23.    _root.createEmptyMovieClip("player2",101);
  24.    player2.attachMovie("theFish_mov",fish,102);
  25.    player2._x = 600;
  26.    player2._y = 300;
  27.    player2._xscale = 80;
  28.    player2._yscale = 80;
  29. }
  30. var repeatTime = 0;
  31. var repeatTime2 = 0;
  32. var repeatTime3 = 0;
  33. var pigCount = 81;
  34. var pigPresent = false;
  35. var hpRegenDelay = 0;
  36. var repeatTimeP2_ = 0;
  37. var repeatTimeP2_2 = 0;
  38. var repeatTimeP2_3 = 29;
  39. var dolphinCount = 81;
  40. var dolphinPresent = false;
  41. var spRegenDelay2 = 0;
  42. tryAgain_mv._visible = false;
  43. var bulletCount = 0;
  44. var MMCount = 0;
  45. var burgerCount = 0;
  46. var kfcCount = 0;
  47. var enemyBurger = 0;
  48. var enemyMM = 0;
  49. var enemyGator = 0;
  50. var enemyKfc = 0;
  51. var bossEnemy = 0;
  52. var kfcPresent = false;
  53. var bossPresent = false;
  54. var speed = 6;
  55. var chickenDamage = 25;
  56. var chickenDelay = 5;
  57. var pigDelay = 5;
  58. var pigDamage = 75;
  59. var fireDelay = 1;
  60. var fireDamage = 6;
  61. var playerHP = 130;
  62. var playerMaxHP = 130;
  63. var playerSP = 100;
  64. var playerMaxSP = 100;
  65. var playerDisSP = Math.floor(playerSP);
  66. var playerDisHP = Math.floor(playerHP);
  67. var player1Money = 0;
  68. var speed_2 = 12;
  69. var pinkFishBulletDamage = 20;
  70. var pinkFishBulletDelay = 10;
  71. var dolphinDelay = 2;
  72. var dolphinDamage = 80;
  73. var swordfishDelay = 20;
  74. var swordfishDamage = 45;
  75. var player2MaxHP = 95;
  76. var player2HP = 95;
  77. var player2SP = 125;
  78. var player2MaxSP = 125;
  79. var player2DisSP = Math.floor(player2SP);
  80. var player2Regen = player2MaxSP / 100;
  81. var player2Money = 0;
  82. var bulletNumber = 60;
  83. var burgerHP = 60;
  84. var burgerRate = 10;
  85. var burgerNumber = 100;
  86. var statueHP = 4000;
  87. var newbg_dx = 2;
  88. player.onEnterFrame = function()
  89. {
  90.    checkKey1();
  91.    spawnEnemy();
  92.    checkBeingHit();
  93.    hpRegen();
  94.    updateStat();
  95.    platformScroller();
  96.    if(playerHP <= 0)
  97.    {
  98.       player.removeMovieClip();
  99.       tryAgain_mv._visible = true;
  100.       kfcLayer.removeMovieClip();
  101.       bossLayer.removeMovieClip();
  102.    }
  103. };
  104. player2.onEnterFrame = function()
  105. {
  106.    checkKey2();
  107.    spawnEnemy();
  108.    checkBeingHit();
  109.    spRegen2();
  110.    updateStat();
  111.    platformScroller();
  112.    if(player2HP <= 0)
  113.    {
  114.       player2.removeMovieClip();
  115.       tryAgain_mv._visible = true;
  116.       kfcLayer.removeMovieClip();
  117.       bossLayer.removeMovieClip();
  118.    }
  119. };
  120. checkKey1 = function()
  121. {
  122.    if(Key.isDown(69))
  123.    {
  124.       playerHP++;
  125.       playerSP++;
  126.    }
  127.    if(Key.isDown(37))
  128.    {
  129.       player._x += - speed;
  130.       if(player._x < 50)
  131.       {
  132.          player._x = 50;
  133.       }
  134.    }
  135.    if(Key.isDown(39))
  136.    {
  137.       player._x += speed;
  138.       if(player._x > 750)
  139.       {
  140.          player._x = 750;
  141.       }
  142.    }
  143.    if(Key.isDown(38))
  144.    {
  145.       player._y += - speed;
  146.       if(player._y < 50)
  147.       {
  148.          player._y = 50;
  149.       }
  150.    }
  151.    if(Key.isDown(40))
  152.    {
  153.       player._y += speed;
  154.       if(player._y > 420)
  155.       {
  156.          player._y = 420;
  157.       }
  158.    }
  159.    if(Key.isDown(67))
  160.    {
  161.       firing1 = true;
  162.       repeatTime++;
  163.       repeatTime %= chickenDelay;
  164.    }
  165.    else
  166.    {
  167.       firing1 = false;
  168.    }
  169.    if(firing1 && repeatTime == 0 && firing3 == false)
  170.    {
  171.       nellyStat.logo_chicken.gotoAndPlay(2);
  172.       createChicken("chicken_mov",player._x,player._y,-15,Math.random() * 6 - 3);
  173.    }
  174.    if(Key.isDown(90))
  175.    {
  176.       firing2 = true;
  177.       repeatTime2++;
  178.       repeatTime2 %= pigDelay;
  179.    }
  180.    else
  181.    {
  182.       firing2 = false;
  183.    }
  184.    if(firing2 && repeatTime2 == 1 && playerSP >= 30 && pigPresent == false)
  185.    {
  186.       pigPresent = true;
  187.       nellyStat.logo_pig.gotoAndPlay(2);
  188.       playerSP -= 30;
  189.       createPig("pig_mov",player._x - 100,player._y + 100,-0.2,0);
  190.    }
  191.    if(Key.isDown(88))
  192.    {
  193.       repeatTime3++;
  194.       repeatTime3 %= fireDelay;
  195.       if(playerSP > 0)
  196.       {
  197.          firing3 = true;
  198.       }
  199.       if(playerSP < 0)
  200.       {
  201.          playerSP = 0;
  202.       }
  203.    }
  204.    else
  205.    {
  206.       firing3 = false;
  207.    }
  208.    if(firing3 && repeatTime3 == 0 && firing1 == false && firing2 == false && playerSP > 0)
  209.    {
  210.       player[fridge].gotoAndPlay("player_fire");
  211.       nellyStat.logo_cow.gotoAndPlay(2);
  212.       playerSP -= 1;
  213.       createFire("fire_mov",player._x - 60,player._y + 70,-10,Math.random() * 12 - 6);
  214.    }
  215.    else
  216.    {
  217.       nellyStat.logo_cow.gotoAndPlay(1);
  218.    }
  219. };
  220. checkKey2 = function()
  221. {
  222.    if(Key.isDown(69))
  223.    {
  224.       player2HP++;
  225.       player2SP++;
  226.    }
  227.    if(Key.isDown(37))
  228.    {
  229.       player2._x += - speed_2;
  230.       if(player2._x < 50)
  231.       {
  232.          player2._x = 50;
  233.       }
  234.    }
  235.    if(Key.isDown(39))
  236.    {
  237.       player2._x += speed_2;
  238.       if(player2._x > 750)
  239.       {
  240.          player2._x = 750;
  241.       }
  242.    }
  243.    if(Key.isDown(38))
  244.    {
  245.       player2._y += - speed_2;
  246.       if(player2._y < 10)
  247.       {
  248.          player2._y = 10;
  249.       }
  250.    }
  251.    if(Key.isDown(40))
  252.    {
  253.       player2._y += speed_2;
  254.       if(player2._y > 500)
  255.       {
  256.          player2._y = 500;
  257.       }
  258.    }
  259.    if(Key.isDown(67))
  260.    {
  261.       firing1 = true;
  262.       repeatTimeP2_++;
  263.       repeatTimeP2_ %= pinkFishBulletDelay;
  264.    }
  265.    else
  266.    {
  267.       firing1 = false;
  268.    }
  269.    if(firing1 && repeatTimeP2_ == 0 && firing3 == false)
  270.    {
  271.       linaStat.logo_pinkfish.gotoAndPlay(2);
  272.       createpinkFishBullet("pinkFishBullet_mov",player2._x - 50,player2._y + 35,-20 + Math.random() * 3,0);
  273.       createpinkFishBullet("pinkFishBullet_mov",player2._x - 60,player2._y + 50,-20 + Math.random() * 3,0);
  274.       createpinkFishBullet("pinkFishBullet_mov",player2._x - 50,player2._y + 65,-20 + Math.random() * 3,0);
  275.    }
  276.    if(Key.isDown(90))
  277.    {
  278.       firing2 = true;
  279.       repeatTimeP2_2++;
  280.       repeatTimeP2_2 %= dolphinDelay;
  281.    }
  282.    else
  283.    {
  284.       firing2 = false;
  285.    }
  286.    if(firing2 && repeatTimeP2_2 == 1 && player2SP >= 10 && dolphinPresent == false)
  287.    {
  288.       dolphinPresent = true;
  289.       linaStat.logo_dolphin.gotoAndPlay(2);
  290.       player2SP -= 10;
  291.       createdolphin("dolphinRing_mov",player2._x,player2._y,0,0);
  292.    }
  293.    if(Key.isDown(88))
  294.    {
  295.       repeatTimeP2_3++;
  296.       repeatTimeP2_3 %= swordfishDelay;
  297.       if(player2SP > 0)
  298.       {
  299.          firing3 = true;
  300.       }
  301.       if(player2SP < 0)
  302.       {
  303.          player2SP = 0;
  304.       }
  305.    }
  306.    else
  307.    {
  308.       firing3 = false;
  309.       repeatTimeP2_3++;
  310.       if(repeatTimeP2_3 >= swordfishDelay - 1)
  311.       {
  312.          repeatTimeP2_3 = swordfishDelay - 1;
  313.       }
  314.    }
  315.    if(firing3 && repeatTimeP2_3 == 0 && firing1 == false && firing2 == false && player2SP >= 20)
  316.    {
  317.       linaStat.logo_swordfish.gotoAndPlay(2);
  318.       player2SP -= 20;
  319.       createswordfish("swordfish_mov",player2._x + 100,player2._y + 150,-20,0);
  320.    }
  321. };
  322. createChicken = function(type, x, y, dx, dy)
  323. {
  324.    bulletCount++;
  325.    bulletCount %= bulletNumber;
  326.    cnm = "chicken" + bulletCount;
  327.    bulletLayer.attachMovie(type,cnm,bulletCount);
  328.    bulletLayer[cnm]._x = x;
  329.    bulletLayer[cnm]._y = y;
  330.    bulletLayer[cnm].dx = dx;
  331.    bulletLayer[cnm].dy = dy;
  332.    bulletLayer[cnm]._xscale = 90;
  333.    bulletLayer[cnm]._yscale = 90;
  334.    bulletLayer[cnm].onEnterFrame = function()
  335.    {
  336.       this._x += this.dx;
  337.       this._y += this.dy;
  338.       if(this._x < player._x - 700)
  339.       {
  340.          this.removeMovieClip();
  341.       }
  342.       var _loc2_ = 0;
  343.       while(_loc2_ < burgerNumber)
  344.       {
  345.          var _loc3_ = "burger" + _loc2_;
  346.          if(this.hitTest(burgerLayer[_loc3_]) && burgerLayer[_loc3_]._currentframe < 16 && this._currentframe < 21)
  347.          {
  348.             burgerLayer[_loc3_].hp -= chickenDamage;
  349.             playerSP += 0.35;
  350.             this.dx = 0;
  351.             this.gotoAndPlay("bullet_die");
  352.          }
  353.          _loc2_ = _loc2_ + 1;
  354.       }
  355.       _loc2_ = 0;
  356.       while(_loc2_ < 20)
  357.       {
  358.          var _loc4_ = "hitSpot" + _loc2_;
  359.          if(this.hitTest(statue_mov[_loc4_]) && this._currentframe < 21)
  360.          {
  361.             statueHP -= chickenDamage;
  362.             playerSP += 0.2;
  363.             this.dx = 0;
  364.             this.gotoAndPlay("bullet_die");
  365.          }
  366.          _loc2_ = _loc2_ + 1;
  367.       }
  368.       _loc2_ = 0;
  369.       while(_loc2_ < 20)
  370.       {
  371.          _loc3_ = "kfc" + _loc2_;
  372.          if(this.hitTest(kfcLayer[_loc3_]) && kfcLayer[_loc3_]._currentframe <= 10 && this._currentframe < 21)
  373.          {
  374.             kfcLayer[_loc3_].hp -= chickenDamage;
  375.             playerSP += 0.2;
  376.             this.gotoAndPlay("bullet_die");
  377.          }
  378.          _loc2_ = _loc2_ + 1;
  379.       }
  380.       _loc2_ = 0;
  381.       while(_loc2_ < 20)
  382.       {
  383.          _loc3_ = "boss" + _loc2_;
  384.          if(this.hitTest(bossLayer[_loc3_].boss_eye) && this._currentframe < 21)
  385.          {
  386.             bossLayer[_loc3_].hp -= chickenDamage;
  387.             playerSP += 1;
  388.             this.gotoAndPlay("bullet_die");
  389.          }
  390.          _loc2_ = _loc2_ + 1;
  391.       }
  392.    };
  393. };
  394. createpinkFishBullet = function(type, x, y, dx, dy)
  395. {
  396.    bulletCount++;
  397.    bulletCount %= bulletNumber;
  398.    cnm = "pinkFishBullet" + bulletCount;
  399.    bulletLayer.attachMovie(type,cnm,bulletCount);
  400.    bulletLayer[cnm]._x = x;
  401.    bulletLayer[cnm]._y = y;
  402.    bulletLayer[cnm].dx = dx;
  403.    bulletLayer[cnm].dy = dy;
  404.    bulletLayer[cnm]._xscale = 25;
  405.    bulletLayer[cnm]._yscale = 25;
  406.    bulletLayer[cnm].onEnterFrame = function()
  407.    {
  408.       this._x += this.dx;
  409.       this._y += this.dy;
  410.       if(this.hitTest(testObject) && this._currentframe < 21)
  411.       {
  412.          testHP += pinkFishBulletDamage;
  413.          this.dx = 0;
  414.          this.gotoAndPlay("bullet_die");
  415.       }
  416.       if(this._x < player2._x - 700)
  417.       {
  418.          this.removeMovieClip();
  419.       }
  420.       var _loc2_ = 0;
  421.       while(_loc2_ < burgerNumber)
  422.       {
  423.          var _loc3_ = "burger" + _loc2_;
  424.          if(this.hitTest(burgerLayer[_loc3_]) && burgerLayer[_loc3_]._currentframe < 16 && this._currentframe < 21)
  425.          {
  426.             burgerLayer[_loc3_].hp -= pinkFishBulletDamage;
  427.             this.dx = 0;
  428.             this.gotoAndPlay("bullet_die");
  429.          }
  430.          _loc2_ = _loc2_ + 1;
  431.       }
  432.       _loc2_ = 0;
  433.       while(_loc2_ < 20)
  434.       {
  435.          var _loc4_ = "hitSpot" + _loc2_;
  436.          if(this.hitTest(statue_mov[_loc4_]) && this._currentframe < 21)
  437.          {
  438.             statueHP -= pinkFishBulletDamage;
  439.             this.dx = 0;
  440.             this.gotoAndPlay("bullet_die");
  441.          }
  442.          _loc2_ = _loc2_ + 1;
  443.       }
  444.       _loc2_ = 0;
  445.       while(_loc2_ < 20)
  446.       {
  447.          _loc3_ = "kfc" + _loc2_;
  448.          if(this.hitTest(kfcLayer[_loc3_]) && kfcLayer[_loc3_]._currentframe <= 10 && this._currentframe < 21)
  449.          {
  450.             kfcLayer[_loc3_].hp -= pinkFishBulletDamage;
  451.             this.gotoAndPlay("bullet_die");
  452.          }
  453.          _loc2_ = _loc2_ + 1;
  454.       }
  455.       _loc2_ = 0;
  456.       while(_loc2_ < 20)
  457.       {
  458.          _loc3_ = "boss" + _loc2_;
  459.          if(this.hitTest(bossLayer[_loc3_].boss_eye) && this._currentframe < 21)
  460.          {
  461.             bossLayer[_loc3_].hp -= pinkFishBulletDamage;
  462.             this.gotoAndPlay("bullet_die");
  463.          }
  464.          _loc2_ = _loc2_ + 1;
  465.       }
  466.    };
  467. };
  468. createPig = function(type, x, y, dx, dy)
  469. {
  470.    pigCount++;
  471.    if(pigCount > 81)
  472.    {
  473.       pigCount = 81;
  474.    }
  475.    pnm = "pig" + pigCount;
  476.    pigLayer.attachMovie(type,pnm,pigCount);
  477.    pigLayer[pnm]._x = x;
  478.    pigLayer[pnm]._y = y;
  479.    pigLayer[pnm].dx = dx;
  480.    pigLayer[pnm].dy = dy;
  481.    pigLayer[pnm]._xscale = 100;
  482.    pigLayer[pnm]._yscale = 100;
  483.    pigLayer[pnm].pTimer = 0;
  484.    pigLayer[pnm].pHP = 40;
  485.    pigLayer[pnm].onEnterFrame = function()
  486.    {
  487.       this.pTimer = this.pTimer + 1;
  488.       this.pTimer %= 240;
  489.       this._x += this.dx;
  490.       this._y += this.dy;
  491.       if((this.pTimer > 220 || this.pHP <= 0) && this._currentframe < 16)
  492.       {
  493.          nellyStat.logo_pig.gotoAndPlay(1);
  494.          pigPresent = false;
  495.          this.gotoAndPlay("pig_die");
  496.       }
  497.       var _loc2_ = 0;
  498.       while(_loc2_ < burgerNumber)
  499.       {
  500.          var _loc3_ = "burger" + _loc2_;
  501.          if(this.hitTest(burgerLayer[_loc3_]) && burgerLayer[_loc3_]._currentframe < 16)
  502.          {
  503.             burgerLayer[_loc3_].hp -= pigDamage;
  504.             this.pHP = this.pHP - 1;
  505.             if(this._currentframe < 16)
  506.             {
  507.                this.gotoAndPlay("pig_hit");
  508.             }
  509.          }
  510.          _loc2_ = _loc2_ + 1;
  511.       }
  512.       _loc2_ = 0;
  513.       while(_loc2_ < 20)
  514.       {
  515.          var _loc4_ = "hitSpot" + _loc2_;
  516.          if(this.hitTest(statue_mov[_loc4_]) && this._currentframe < 16)
  517.          {
  518.             this.pHP = this.pHP - 1;
  519.             this.gotoAndPlay("pig_hit");
  520.             statueHP -= pigDamage;
  521.          }
  522.          _loc2_ = _loc2_ + 1;
  523.       }
  524.       _loc2_ = 0;
  525.       while(_loc2_ < 20)
  526.       {
  527.          _loc3_ = "gator" + _loc2_;
  528.          if(this.hitTest(gatorLayer[_loc3_]) && this._currentframe < 16 && gatorLayer[_loc3_]._currentframe <= 15)
  529.          {
  530.             this.pHP = this.pHP - 1;
  531.             this.gotoAndPlay("pig_hit");
  532.             gatorLayer[_loc3_].gotoAndPlay("gator_die");
  533.          }
  534.          _loc2_ = _loc2_ + 1;
  535.       }
  536.       _loc2_ = 0;
  537.       while(_loc2_ < 20)
  538.       {
  539.          _loc3_ = "kfc" + _loc2_;
  540.          if(this.hitTest(kfcLayer[_loc3_]) && this._currentframe < 16)
  541.          {
  542.             this.pHP = this.pHP - 1;
  543.             this.gotoAndPlay("pig_hit");
  544.             kfcLayer[_loc3_].hp -= pigDamage;
  545.          }
  546.          _loc2_ = _loc2_ + 1;
  547.       }
  548.       _loc2_ = 0;
  549.       while(_loc2_ < 20)
  550.       {
  551.          _loc3_ = "boss" + _loc2_;
  552.          if(this.hitTest(bossLayer[_loc3_].boss_eye) && this._currentframe < 16)
  553.          {
  554.             this.pHP = this.pHP - 1;
  555.             this.gotoAndPlay("pig_hit");
  556.             bossLayer[_loc3_].hp -= pigDamage;
  557.          }
  558.          _loc2_ = _loc2_ + 1;
  559.       }
  560.    };
  561. };
  562. createdolphin = function(type, x, y, dx, dy)
  563. {
  564.    dolphinCount++;
  565.    if(dolphinCount > 81)
  566.    {
  567.       dolphinCount = 81;
  568.    }
  569.    pnm = "dolphin" + dolphinCount;
  570.    dolphinLayer.attachMovie(type,pnm,dolphinCount);
  571.    dolphinLayer[pnm]._x = x;
  572.    dolphinLayer[pnm]._y = y;
  573.    dolphinLayer[pnm].dx = dx;
  574.    dolphinLayer[pnm].dy = dy;
  575.    dolphinLayer[pnm]._xscale = 100;
  576.    dolphinLayer[pnm]._yscale = 100;
  577.    dolphinLayer[pnm].pTimer = 0;
  578.    dolphinLayer[pnm].pHP = 30;
  579.    dolphinLayer[pnm].onEnterFrame = function()
  580.    {
  581.       this.pTimer = this.pTimer + 1;
  582.       this.pTimer %= 360;
  583.       this._x = player2._x;
  584.       this._y = player2._y;
  585.       if((this.pTimer > 350 || this.pHP <= 0 || player2SP <= 0) && this._currentframe <= 7)
  586.       {
  587.          linaStat.logo_dolphin.gotoAndPlay(1);
  588.          dolphinPresent = false;
  589.          this.gotoAndPlay("dolphin_die");
  590.       }
  591.       var _loc2_ = 0;
  592.       while(_loc2_ < burgerNumber)
  593.       {
  594.          var _loc3_ = "burger" + _loc2_;
  595.          if(this.hitTest(burgerLayer[_loc3_]) && burgerLayer[_loc3_]._currentframe <= 7)
  596.          {
  597.             burgerLayer[_loc3_].hp -= dolphinDamage;
  598.             this.pHP = this.pHP - 1;
  599.             player2SP -= 5 * difficulty;
  600.             this.gotoAndPlay("dolphin_hit");
  601.          }
  602.          _loc2_ = _loc2_ + 1;
  603.       }
  604.       _loc2_ = 0;
  605.       while(_loc2_ < 20)
  606.       {
  607.          var _loc4_ = "hitSpot" + _loc2_;
  608.          if(this.hitTest(statue_mov[_loc4_]) && this._currentframe < 7)
  609.          {
  610.             this.pHP = this.pHP - 1;
  611.             player2SP -= 5 * difficulty;
  612.             this.gotoAndPlay("dolphin_hit");
  613.             statueHP -= dolphinDamage;
  614.          }
  615.          _loc2_ = _loc2_ + 1;
  616.       }
  617.       _loc2_ = 0;
  618.       while(_loc2_ < 20)
  619.       {
  620.          _loc3_ = "gator" + _loc2_;
  621.          if(this.hitTest(gatorLayer[_loc3_]) && this._currentframe < 7 && gatorLayer[_loc3_]._currentframe <= 15)
  622.          {
  623.             this.pHP = this.pHP - 1;
  624.             player2SP -= 10 * difficulty;
  625.             this.gotoAndPlay("dolphin_hit");
  626.             gatorLayer[_loc3_].gotoAndPlay("gator_die");
  627.          }
  628.          _loc2_ = _loc2_ + 1;
  629.       }
  630.       _loc2_ = 0;
  631.       while(_loc2_ < 20)
  632.       {
  633.          _loc3_ = "kfc" + _loc2_;
  634.          if(this.hitTest(kfcLayer[_loc3_]) && this._currentframe < 7)
  635.          {
  636.             this.pHP = this.pHP - 1;
  637.             player2SP -= 5 * difficulty;
  638.             this.gotoAndPlay("dolphin_hit");
  639.             kfcLayer[_loc3_].hp -= dolphinDamage;
  640.          }
  641.          _loc2_ = _loc2_ + 1;
  642.       }
  643.       _loc2_ = 0;
  644.       while(_loc2_ < 20)
  645.       {
  646.          _loc3_ = "boss" + _loc2_;
  647.          if(this.hitTest(bossLayer[_loc3_].boss_eye) && this._currentframe < 7)
  648.          {
  649.             this.pHP = this.pHP - 1;
  650.             player2SP -= 5 * difficulty;
  651.             this.gotoAndPlay("dolphin_hit");
  652.             bossLayer[_loc3_].hp -= dolphinDamage;
  653.          }
  654.          _loc2_ = _loc2_ + 1;
  655.       }
  656.    };
  657. };
  658. createFire = function(type, x, y, dx, dy)
  659. {
  660.    bulletCount++;
  661.    bulletCount %= 15;
  662.    fnm = "fire" + bulletCount;
  663.    fireLayer.attachMovie(type,fnm,bulletCount);
  664.    fireLayer[fnm]._x = x;
  665.    fireLayer[fnm]._y = y;
  666.    fireLayer[fnm].dx = dx;
  667.    fireLayer[fnm].dy = dy;
  668.    fireLayer[fnm]._xscale = 100;
  669.    fireLayer[fnm]._yscale = 100;
  670.    fireLayer[fnm].onEnterFrame = function()
  671.    {
  672.       this._x += this.dx;
  673.       this._y += this.dy;
  674.       if(this._x < player._x - 250)
  675.       {
  676.          this.removeMovieClip();
  677.       }
  678.       if(this.hitTest(testObject))
  679.       {
  680.          testHP += fireDamage;
  681.       }
  682.       var _loc2_ = 0;
  683.       while(_loc2_ < burgerNumber)
  684.       {
  685.          var _loc3_ = "burger" + _loc2_;
  686.          if(this.hitTest(burgerLayer[_loc3_]) && burgerLayer[_loc3_]._currentframe < 16)
  687.          {
  688.             burgerLayer[_loc3_].hp -= fireDamage;
  689.          }
  690.          _loc2_ = _loc2_ + 1;
  691.       }
  692.       _loc2_ = 0;
  693.       while(_loc2_ < 20)
  694.       {
  695.          var _loc4_ = "hitSpot" + _loc2_;
  696.          if(this.hitTest(statue_mov[_loc4_]))
  697.          {
  698.             statueHP -= fireDamage;
  699.          }
  700.          _loc2_ = _loc2_ + 1;
  701.       }
  702.       _loc2_ = 0;
  703.       while(_loc2_ < 20)
  704.       {
  705.          _loc3_ = "kfc" + _loc2_;
  706.          if(this.hitTest(kfcLayer[_loc3_]) && kfcLayer[_loc3_]._currentframe <= 10)
  707.          {
  708.             kfcLayer[_loc3_].hp -= fireDamage;
  709.          }
  710.          _loc2_ = _loc2_ + 1;
  711.       }
  712.       _loc2_ = 0;
  713.       while(_loc2_ < 20)
  714.       {
  715.          _loc3_ = "boss" + _loc2_;
  716.          if(this.hitTest(bossLayer[_loc3_].boss_eye))
  717.          {
  718.             bossLayer[_loc3_].hp -= fireDamage;
  719.          }
  720.          _loc2_ = _loc2_ + 1;
  721.       }
  722.    };
  723. };
  724. createswordfish = function(type, x, y, dx, dy)
  725. {
  726.    bulletCount++;
  727.    bulletCount %= bulletNumber;
  728.    fnm = "swordfish" + bulletCount;
  729.    swordfishLayer.attachMovie(type,fnm,bulletCount);
  730.    swordfishLayer[fnm]._x = x;
  731.    swordfishLayer[fnm]._y = y;
  732.    swordfishLayer[fnm].dx = dx;
  733.    swordfishLayer[fnm].dy = dy;
  734.    swordfishLayer[fnm]._xscale = 100;
  735.    swordfishLayer[fnm]._yscale = 100;
  736.    swordfishLayer[fnm].onEnterFrame = function()
  737.    {
  738.       this._x += this.dx;
  739.       this._y += this.dy;
  740.       if(this._x < -75)
  741.       {
  742.          this.removeMovieClip();
  743.       }
  744.       if(this.hitTest(testObject))
  745.       {
  746.          testHP += swordfishDamage;
  747.       }
  748.       var _loc2_ = 0;
  749.       while(_loc2_ < burgerNumber)
  750.       {
  751.          var _loc3_ = "burger" + _loc2_;
  752.          if(this.hitTest(burgerLayer[_loc3_]) && burgerLayer[_loc3_]._currentframe < 16)
  753.          {
  754.             burgerLayer[_loc3_].hp -= swordfishDamage;
  755.          }
  756.          _loc2_ = _loc2_ + 1;
  757.       }
  758.       _loc2_ = 0;
  759.       while(_loc2_ < 20)
  760.       {
  761.          var _loc4_ = "hitSpot" + _loc2_;
  762.          if(this.hitTest(statue_mov[_loc4_]))
  763.          {
  764.             statueHP -= swordfishDamage;
  765.          }
  766.          _loc2_ = _loc2_ + 1;
  767.       }
  768.       _loc2_ = 0;
  769.       while(_loc2_ < 20)
  770.       {
  771.          _loc3_ = "kfc" + _loc2_;
  772.          if(this.hitTest(kfcLayer[_loc3_]) && kfcLayer[_loc3_]._currentframe <= 10)
  773.          {
  774.             kfcLayer[_loc3_].hp -= swordfishDamage;
  775.          }
  776.          _loc2_ = _loc2_ + 1;
  777.       }
  778.       _loc2_ = 0;
  779.       while(_loc2_ < 20)
  780.       {
  781.          _loc3_ = "boss" + _loc2_;
  782.          if(this.hitTest(bossLayer[_loc3_].boss_eye))
  783.          {
  784.             bossLayer[_loc3_].hp -= swordfishDamage;
  785.          }
  786.          _loc2_ = _loc2_ + 1;
  787.       }
  788.    };
  789. };
  790. spawnEnemy = function()
  791. {
  792.    enemyBurger++;
  793.    enemyBurger %= burgerRate;
  794.    if(enemyBurger == 0)
  795.    {
  796.       if(nellySelected == true)
  797.       {
  798.          burgerY = player._y;
  799.       }
  800.       if(nellySelected == false)
  801.       {
  802.          burgerY = player2._y;
  803.       }
  804.       createBurger("burger",-10,burgerY);
  805.       createBurger("burger",0,burgerY);
  806.       createBurger("burger",20,burgerY);
  807.    }
  808. };
  809. createBurger = function(type, x, y)
  810. {
  811.    burgerCount++;
  812.    burgerCount %= burgerNumber;
  813.    nm = "burger" + burgerCount;
  814.    burgerLayer.attachMovie(type,nm,burgerCount);
  815.    burgerLayer[nm]._y = y;
  816.    burgerLayer[nm].yline = y;
  817.    burgerLayer[nm]._x = x;
  818.    burgerLayer[nm].dx = Math.random() * 3 + 10;
  819.    burgerLayer[nm].t = Math.random() * 6.28;
  820.    burgerLayer[nm]._xscale = -75;
  821.    burgerLayer[nm]._yscale = 75;
  822.    burgerLayer[nm].hp = burgerHP;
  823.    burgerLayer[nm].onEnterFrame = function()
  824.    {
  825.       this._y = this.yline + Math.sin(this.t) * 100;
  826.       this._x += this.dx;
  827.       this.t += 0.1;
  828.       if(this._y > 800)
  829.       {
  830.          this.removeMovieClip();
  831.       }
  832.       if(this._y < -200)
  833.       {
  834.          this.removeMovieClip();
  835.       }
  836.       if(this._x > 800)
  837.       {
  838.          this.removeMovieClip();
  839.       }
  840.       if(this._x < 0)
  841.       {
  842.          this.removeMovieClip();
  843.       }
  844.       if(this.hp <= 0 && this._currentframe < 16)
  845.       {
  846.          this.gotoAndPlay("enemy_die");
  847.          player1Money += 2;
  848.          player2Money += 2;
  849.       }
  850.    };
  851. };
  852. createMM = function(x, y)
  853. {
  854.    MMCount++;
  855.    MMCount %= 20;
  856.    mnm = "MM" + MMCount;
  857.    MMLayer.attachMovie("MM_mov",mnm,20 - MMCount);
  858.    MMLayer[mnm]._x = x;
  859.    MMLayer[mnm]._y = y;
  860.    MMLayer[mnm].scaleAcc = 0.5;
  861.    MMLayer[mnm].scaleRate = 0.5;
  862.    MMLayer[mnm]._xscale = 10;
  863.    MMLayer[mnm]._yscale = 10;
  864.    MMLayer[mnm].frame = Math.ceil(Math.random() * 4);
  865.    MMLayer[mnm].yrange = (- Math.random()) * 14;
  866.    MMLayer[mnm].xrange = Math.random() * 8 - 4;
  867.    MMLayer[mnm].onEnterFrame = function()
  868.    {
  869.       this.scaleRate += 0.1;
  870.       this._xscale += this.scaleRate;
  871.       this._yscale += this.scaleRate;
  872.       this._x += this.xrange;
  873.       this._y += this.yrange;
  874.       if(this._xscale >= 130 && this._currentframe < 5)
  875.       {
  876.          this.gotoAndPlay("enemy_die");
  877.       }
  878.    };
  879. };
  880. gatorCount = 0;
  881. createGator = function(x, y, z)
  882. {
  883.    gatorCount++;
  884.    gatorCount %= 20;
  885.    gnm = "gator" + gatorCount;
  886.    gatorLayer.attachMovie("gator_mov",gnm,gatorCount);
  887.    gatorLayer[gnm]._x = x;
  888.    gatorLayer[gnm]._y = y;
  889.    gatorLayer[gnm].dy = z;
  890.    gatorLayer[gnm].dyAcc = 1;
  891.    gatorLayer[gnm].onEnterFrame = function()
  892.    {
  893.       this._x -= 1;
  894.       this.dy += this.dyAcc;
  895.       this._y += this.dy;
  896.       if(this.dy >= 0 && this._currentframe < 5)
  897.       {
  898.          if(this._currentframe < 16)
  899.          {
  900.             this.gotoAndPlay("gator_turn");
  901.          }
  902.       }
  903.       if(this._y > 600)
  904.       {
  905.          this.removeMovieClip();
  906.       }
  907.    };
  908. };
  909. createKfc = function(x, y)
  910. {
  911.    kfcCount++;
  912.    kfcCount %= 20;
  913.    knm = "kfc" + kfcCount;
  914.    kfcLayer.attachMovie("kfc_mov",knm,kfcCount);
  915.    kfcLayer[knm]._x = x;
  916.    kfcLayer[knm]._y = y;
  917.    kfcLayer[knm].hp = 2000;
  918.    kfcLayer[knm].speed = 2;
  919.    kfcLayer[knm].onEnterFrame = function()
  920.    {
  921.       if(nellySelected == true)
  922.       {
  923.          if(this._x > player._x)
  924.          {
  925.             this._x -= this.speed;
  926.          }
  927.          if(this._x < player._x)
  928.          {
  929.             this._x += this.speed;
  930.          }
  931.       }
  932.       if(nellySelected == false)
  933.       {
  934.          if(this._x > player2._x)
  935.          {
  936.             this._x -= this.speed;
  937.          }
  938.          if(this._x < player2._x)
  939.          {
  940.             this._x += this.speed;
  941.          }
  942.       }
  943.       enemyGator++;
  944.       enemyGator %= 40;
  945.       if(enemyGator == 0)
  946.       {
  947.          createGator(this._x + 50,600,-25);
  948.       }
  949.       if(this.hp <= 0 && this._currentframe <= 10)
  950.       {
  951.          this.gotoAndPlay("enemy_die");
  952.          player1Money += 200;
  953.          player2Money += 200;
  954.       }
  955.    };
  956. };
  957. bossCount = 0;
  958. bossTimer = 0;
  959. createBoss = function(x, y)
  960. {
  961.    bossCount = 1;
  962.    bnm = "boss" + bossCount;
  963.    bossLayer.attachMovie("boss_1_mov",bnm,bossCount);
  964.    bossLayer[bnm]._x = x;
  965.    bossLayer[bnm]._y = y;
  966.    bossLayer[bnm].MaxHp = 4000;
  967.    bossLayer[bnm].hp = 4000;
  968.    bossLayer[bnm].randomAtk = 0;
  969.    bossLayer[bnm].atk1 = false;
  970.    bossLayer[bnm].atk2 = false;
  971.    bossLayer[bnm].atk3 = false;
  972.    bossLayer[bnm].onEnterFrame = function()
  973.    {
  974.       this.hpBar._width = this.hp / this.MaxHp * 600;
  975.       burgerRate = 9999999999;
  976.       bossTimer++;
  977.       bossTimer %= 100;
  978.       enemyGator++;
  979.       enemyGator %= 20;
  980.       if(enemyGator == 0 && this._currentframe < 111 && this._currentframe > 80)
  981.       {
  982.          createGator(Math.random() * 500 + 100,600,-33);
  983.       }
  984.       if(bossTimer == 0 && this._currentframe < 206)
  985.       {
  986.          this.randomAtk = Math.random() * 100;
  987.          if(this.randomAtk <= 33)
  988.          {
  989.             this.gotoAndPlay("enemy_atk1");
  990.          }
  991.          if(this.randomAtk > 33 && this.randomAtk <= 66)
  992.          {
  993.             this.gotoAndPlay("enemy_atk2");
  994.          }
  995.          if(this.randomAtk > 66)
  996.          {
  997.             this.gotoAndPlay("enemy_atk3_begin");
  998.          }
  999.       }
  1000.       if(this.hp <= 0 && this._currentframe < 206)
  1001.       {
  1002.          this.gotoAndPlay("enemy_die");
  1003.          player1Money += 500;
  1004.          player2Money += 500;
  1005.          bossLayer.attachMovie("next_stage_mov","next_stage",10);
  1006.          bossLayer.next_stage._x = 400;
  1007.          bossLayer.next_stage._y = 300;
  1008.          bossLayer.next_stage.next_btn.onRelease = function()
  1009.          {
  1010.             _root.gotoAndPlay("story_2");
  1011.             bossLayer.next_stage.removeMovieClip();
  1012.             player.removeMovieClip();
  1013.             player2.removeMovieClip();
  1014.          };
  1015.       }
  1016.    };
  1017. };
  1018. checkBeingHit = function()
  1019. {
  1020.    var _loc2_ = 0;
  1021.    while(_loc2_ < burgerNumber)
  1022.    {
  1023.       var _loc3_ = "burger" + _loc2_;
  1024.       if(player[fridge].main.hitTest(burgerLayer[_loc3_]) && burgerLayer[_loc3_]._currentframe < 16)
  1025.       {
  1026.          burgerLayer[_loc3_].gotoAndPlay("enemy_die");
  1027.          player[fridge].gotoAndPlay("player_hit");
  1028.          playerHP -= 12 * difficulty;
  1029.       }
  1030.       if(player2[fish].main.hitTest(burgerLayer[_loc3_]) && burgerLayer[_loc3_]._currentframe < 16)
  1031.       {
  1032.          burgerLayer[_loc3_].gotoAndPlay("enemy_die");
  1033.          player2[fish].gotoAndPlay("player_hit");
  1034.          player2HP -= 12 * difficulty;
  1035.       }
  1036.       _loc2_ = _loc2_ + 1;
  1037.    }
  1038.    _loc2_ = 0;
  1039.    while(_loc2_ < 20)
  1040.    {
  1041.       _loc3_ = "MM" + _loc2_;
  1042.       if(player[fridge].main.hitTest(MMLayer[_loc3_]) && MMLayer[_loc3_]._currentframe < 5 && MMLayer[_loc3_]._xscale > 90)
  1043.       {
  1044.          MMLayer[_loc3_].gotoAndPlay("enemy_die");
  1045.          player[fridge].gotoAndPlay("player_hit");
  1046.          playerHP -= 20 * difficulty;
  1047.       }
  1048.       if(player2[fish].main.hitTest(MMLayer[_loc3_]) && MMLayer[_loc3_]._currentframe < 5 && MMLayer[_loc3_]._xscale > 90)
  1049.       {
  1050.          MMLayer[_loc3_].gotoAndPlay("enemy_die");
  1051.          player2[fish].gotoAndPlay("player_hit");
  1052.          player2HP -= 20 * difficulty;
  1053.       }
  1054.       _loc2_ = _loc2_ + 1;
  1055.    }
  1056.    _loc2_ = 0;
  1057.    while(_loc2_ < 20)
  1058.    {
  1059.       _loc3_ = "gator" + _loc2_;
  1060.       if(player[fridge].main.hitTest(gatorLayer[_loc3_]) && gatorLayer[_loc3_]._currentframe <= 15)
  1061.       {
  1062.          player[fridge].gotoAndPlay("player_hit");
  1063.          playerHP -= 10 * difficulty;
  1064.          gatorLayer[_loc3_].gotoAndPlay("gator_die");
  1065.       }
  1066.       if(player2[fish].main.hitTest(gatorLayer[_loc3_]) && gatorLayer[_loc3_]._currentframe <= 15)
  1067.       {
  1068.          player2[fish].gotoAndPlay("player_hit");
  1069.          player2HP -= 10 * difficulty;
  1070.          gatorLayer[_loc3_].gotoAndPlay("gator_die");
  1071.       }
  1072.       _loc2_ = _loc2_ + 1;
  1073.    }
  1074.    _loc2_ = 0;
  1075.    while(_loc2_ < 20)
  1076.    {
  1077.       _loc3_ = "kfc" + _loc2_;
  1078.       if(player[fridge].main.hitTest(kfcLayer[_loc3_]) && (player[fridge]._currentframe <= 30 || player[fridge]._currentframe > 37))
  1079.       {
  1080.          player[fridge].gotoAndPlay("player_hit");
  1081.          playerHP -= 4 * difficulty;
  1082.       }
  1083.       if(player2[fish].main.hitTest(kfcLayer[_loc3_]) && player2[fish]._currentframe <= 30)
  1084.       {
  1085.          player2[fish].gotoAndPlay("player_hit");
  1086.          player2HP -= 4 * difficulty;
  1087.       }
  1088.       _loc2_ = _loc2_ + 1;
  1089.    }
  1090.    _loc2_ = 0;
  1091.    while(_loc2_ < 20)
  1092.    {
  1093.       var _loc1_ = "hitSpot" + _loc2_;
  1094.       if((player[fridge].main.hitTest(bossLayer.boss1.hitSpot1) || player[fridge].main.hitTest(bossLayer.boss1.hitSpot2) || player[fridge].main.hitTest(bossLayer.boss1.boss_spear2[_loc1_]) || player[fridge].main.hitTest(bossLayer.boss1.boss_spear[_loc1_])) && (player[fridge]._currentframe <= 30 || player[fridge]._currentframe > 37))
  1095.       {
  1096.          player[fridge].gotoAndPlay("player_hit");
  1097.          playerHP -= 7 * difficulty;
  1098.       }
  1099.       if((player2[fish].main.hitTest(bossLayer.boss1.hitSpot1) || player2[fish].main.hitTest(bossLayer.boss1.hitSpot2) || player2[fish].main.hitTest(bossLayer.boss1.boss_spear2[_loc1_]) || player2[fish].main.hitTest(bossLayer.boss1.boss_spear[_loc1_])) && player2[fish]._currentframe <= 30)
  1100.       {
  1101.          player2[fish].gotoAndPlay("player_hit");
  1102.          player2HP -= 7 * difficulty;
  1103.       }
  1104.       _loc2_ = _loc2_ + 1;
  1105.    }
  1106. };
  1107. hpRegen = function()
  1108. {
  1109.    hpRegenDelay++;
  1110.    hpRegenDelay %= 24;
  1111.    if(hpRegenDelay == 0)
  1112.    {
  1113.       playerHP += playerMaxHP / 100;
  1114.    }
  1115.    if(playerHP >= playerMaxHP)
  1116.    {
  1117.       playerHP = playerMaxHP;
  1118.    }
  1119.    if(playerSP >= playerMaxSP)
  1120.    {
  1121.       playerSP = playerMaxSP;
  1122.    }
  1123. };
  1124. spRegen2 = function()
  1125. {
  1126.    spRegenDelay2++;
  1127.    spRegenDelay2 %= 12;
  1128.    if(spRegenDelay2 == 0)
  1129.    {
  1130.       player2SP += player2Regen;
  1131.    }
  1132.    if(player2SP > player2MaxSP)
  1133.    {
  1134.       player2SP = player2MaxSP;
  1135.    }
  1136.    if(player2HP > player2MaxHP)
  1137.    {
  1138.       player2HP = player2MaxHP;
  1139.    }
  1140. };
  1141. statue_mov._x = -3200;
  1142. platform._x = -3200;
  1143. skyline._x = -3200;
  1144. island1._x = -2200;
  1145. island2._x = -1000;
  1146. island3._x = -500;
  1147. bg_dx = 10;
  1148. platformScroller = function()
  1149. {
  1150.    island1._x += bg_dx;
  1151.    island2._x += bg_dx;
  1152.    island3._x += bg_dx;
  1153.    if(platform._x > -1400)
  1154.    {
  1155.       enemyKfc++;
  1156.       enemyKfc %= 30;
  1157.       if(enemyKfc == 0 && kfcPresent == false)
  1158.       {
  1159.          createKfc(50,50);
  1160.          kfcPresent = true;
  1161.          burgerRate = 400;
  1162.       }
  1163.    }
  1164.    if(kfcPresent == true)
  1165.    {
  1166.       bg_dx = 0;
  1167.    }
  1168.    if(kfcLayer[knm].hp <= 0)
  1169.    {
  1170.       burgerRate = 40;
  1171.       bg_dx = newbg_dx;
  1172.    }
  1173.    if(island2._x > 100 && island2._x < 700)
  1174.    {
  1175.       enemyMM++;
  1176.       enemyMM %= 30;
  1177.       if(enemyMM == 0)
  1178.       {
  1179.          createMM(island2._x + (Math.random() * 50 - 25),island2._y);
  1180.       }
  1181.    }
  1182.    if(island3._x > 100 && island3._x < 700)
  1183.    {
  1184.       enemyMM++;
  1185.       enemyMM %= 30;
  1186.       if(enemyMM == 0)
  1187.       {
  1188.          createMM(island3._x + (Math.random() * 50 - 25),island3._y);
  1189.       }
  1190.    }
  1191.    if(island1._x > 100 && island1._x < 700)
  1192.    {
  1193.       enemyMM++;
  1194.       enemyMM %= 30;
  1195.       if(enemyMM == 0)
  1196.       {
  1197.          createMM(island1._x + (Math.random() * 50 - 100),island1._y);
  1198.       }
  1199.    }
  1200.    platform._x += bg_dx;
  1201.    if(platform._x >= 0)
  1202.    {
  1203.       platform._x = 0;
  1204.    }
  1205.    skyline._x += bg_dx;
  1206.    if(skyline._x >= 0)
  1207.    {
  1208.       skyline._x = 0;
  1209.    }
  1210.    statue_mov._x += bg_dx;
  1211.    statue_mov.hpBar._width = statueHP / 40;
  1212.    if(statue_mov._x > 0)
  1213.    {
  1214.       statue_mov._x = 0;
  1215.       if(statueHP > 0)
  1216.       {
  1217.          burgerRate = 20;
  1218.       }
  1219.       if(statueHP <= 0)
  1220.       {
  1221.          if(statue_mov._currentframe < 10)
  1222.          {
  1223.             statue_mov.gotoAndPlay("statue_die");
  1224.          }
  1225.          if(bossPresent == false)
  1226.          {
  1227.             bossPresent = true;
  1228.             createBoss(80,370);
  1229.          }
  1230.          burgerRate = 9999999;
  1231.       }
  1232.    }
  1233. };
  1234. updateStat = function()
  1235. {
  1236.    nellyStat.hpBar_p1._width = 115 * (playerHP / playerMaxHP);
  1237.    nellyStat.spBar_p1._width = 105 * (playerSP / playerMaxSP);
  1238.    nellyStat.playerDisSP = Math.floor(playerSP);
  1239.    nellyStat.playerHP = playerHP;
  1240.    nellyStat.playerDisHP = Math.floor(playerHP);
  1241.    nellyStat.player1Money = player1Money;
  1242.    if(nellySelected == true)
  1243.    {
  1244.       linaStat._visible = false;
  1245.    }
  1246.    linaStat.hpBar_p2._width = 115 * (player2HP / player2MaxHP);
  1247.    linaStat.spBar_p2._width = 105 * (player2SP / player2MaxSP);
  1248.    linaStat.player2DisSP = Math.floor(player2SP);
  1249.    linaStat.player2HP = player2HP;
  1250.    linaStat.player2Money = player2Money;
  1251.    if(nellySelected == false)
  1252.    {
  1253.       nellyStat._visible = false;
  1254.    }
  1255. };
  1256.